home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Compute! Gazette 1985 August
/
1985-08.d64
/
text print
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-09-20
|
2KB
|
72 lines
2400 poke198,0
2500 gosub2680
2510 fori=869to922:readd:pokei,d:next:rem data for ml bit map clear
2520 fori=923to956:readd:pokei,d:next:rem data for ml color fill
2530 bm=8192:poke53272,peek(53272)or8:rem put bit map at 8192
2540 sys869:rem clear bit map
2550 pixcol=2:scrcol=1:poke251,pixcol*16+scrcol
2560 sys923:rem set color matrix
2570 poke53265,peek(53265)or32:rem enter bit map mode
2580 rem hi-res plot
2590 fory=60to132:x=40
2600 gosub2920
2610 nexty
2620 forx=110to210:y=28
2630 gosub2920
2640 nextx
2650 forx=96to182:y=x
2660 gosub2920
2670 nextx:goto2740
2680 fori=828to868:readd:pokei,d:next:rem data for ml character rom copy
2690 poke56334,peek(56334)and254:rem turn off interrupts
2700 poke1,peek(1)and251:rem switch in character rom
2710 sys828:rem copy 128 characters to ram starting at 50176
2720 poke1,peek(1)or4:rem switch out character rom
2730 poke56334,peek(56334)or1:return:rem enable interrupts
2740 rem print text
2750 tx=24:ty=68:tcol=5:d=320:text$="vertical"
2760 gosub2960
2770 tx=120:ty=16:tcol=0:d=8:text$="horizontal"
2780 gosub2960
2790 tx=120:ty=104:tcol=4:d=328:text$="diagonal"
2800 gosub2960
2810 tx=160:ty=64:tcol=2:d=8:text$="characters, too:"
2820 gosub2960
2830 tx=160:ty=80:tcol=6:d=8:text$="[223] [182] [184] [183] [172] [176] [171] [177]"
2840 gosub2960
2850 ty=104:tcol=2:text$="[209] [218] [216] [193] [211] [214] [213] [215]"
2860 gosub2960
2870 geta$:ifa$=""then2870:rem press any key to return to basic
2880 poke53265,peek(53265)and223:rem exit from bit map mode
2890 poke53272,21:rem restore normal video
2900 printchr$(147)chr$(5)
2910 end
2920 rem hi-res plot subroutine
2930 row=int(y/8):char=int(x/8):line=yand7:bit=7-(xand7)
2940 byte=bm+row*320+char*8+line:pokebyte,peek(byte)or2^bit
2950 return
2960 rem text print subroutine
2970 bm=8192:scrcol = 1
2980 row=int(ty/8):char=int(tx/8)
2990 byte=bm+row*320+char*8
3000 fori=1tolen(text$)
3010 poke1024+(byte-bm)/8,tcol*16+scrcol
3020 sv=asc(mid$(text$,i,1)):rem get ascii
3030 ifsv<64then3060
3040 ifsv<192thensv=sv-64:goto3060
3050 sv=sv-128
3060 ca=50176+sv*8
3070 forj=0to7
3080 pokebyte+j,peek(ca+j)
3090 nextj
3100 byte=byte+d
3110 nexti
3120 return
3130 data234,72,138,72,152,72,160,0,185,0,208,153,0,196,185,0,209,153,0,197,185
3140 data0,210,153,0,198,185,0,211,153,0,199,200,208,229,104,168,104,170,104,96
3150 data234,72,138,72,152,72,162,32,169,0,133,251,138,133,252,160,0,169,0
3160 data145,251,200,208,251,232,224,63,208,239,169,0,133,251,169,63,133,252
3170 data160,0,169,0,145,251,200,192,64,208,249,104,168,104,170,104,96
3180 data234,72,138,72,152,72,160,0,173,251,0,153,0,4,153,250,4,153,244,5,153
3190 data238,6,200,192,250,208,239,104,168,104,170,104,96